<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="template.xhtml">
	<ui:define name="content">
	<h:form>
	<p:growl id="growl" showDetail="false" sticky="false" life="3000" /> 
	<p:panel header="Sensors">  
		<p:dataTable  var="sensor" value="#{sensorsBean.sensorsList}">
			<p:column headerText="Sensor Id">
				<h:outputText value="#{sensor.sensorId}"></h:outputText>
			</p:column>
			<p:column headerText="Sensor value">
				<h:outputText value="#{sensor.value}" />
			</p:column>
			<p:column headerText="Chart">
				<p:meterGaugeChart value="#{sensor.meterGaugeChartModel}" style="width:150px;height:100px" intervalOuterRadius="30" showTickLabels="false" labelHeightAdjust="0"
					 seriesColors="0062FF, 66cc66, cc6666"/>
			</p:column>
			<p:column headerText="Timestamp">
				<h:outputText value="#{sensor.timestamp}" />	
			</p:column>
			<p:column headerText="Description">
				<h:outputText value="#{sensor.description}" />	
			</p:column>
		</p:dataTable>
	</p:panel>  
	</h:form>
	</ui:define>
</ui:composition>
</html>